﻿

'*******************************************************************
' Program: Data Center Visio Rack Tool
' Author: Albert E Edlund
' Date:
'
' Purpose:
'
'
'
'*******************************************************************


Imports Microsoft.Practices.EnterpriseLibrary.Common
Imports Microsoft.Practices.EnterpriseLibrary.Data
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling
Imports Microsoft.Practices.EnterpriseLibrary.ExceptionHandling.Logging


Imports System
Imports System.ComponentModel
Imports System.Collections.Generic


Public Class dc_VirtualHost
    Implements INotifyPropertyChanged


#Region "Events"

    Public Event PropertyChanged(ByVal sender As Object, ByVal e As System.ComponentModel.PropertyChangedEventArgs) Implements System.ComponentModel.INotifyPropertyChanged.PropertyChanged

    Private Sub OnPropertyChanged(ByVal info As String)
        RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info))
    End Sub

#End Region

#Region " Constructor "

    Public Sub New()
        initProperties()
    End Sub

    Public Sub New(ByVal strUserId As String)
        initProperties()
        Me.m_vhLastEdit = strUserId
    End Sub

#End Region

#Region " Properties and Fields "

    Private m_vhKey As Int32
    Private m_vhOSKey As Int32
    Private m_vhName As String
    Private m_vhVendor As String
    Private m_vhVersion As String
    Private m_vhRelease As String
    Private m_vhServicePack As String
    Private m_vhFixLevel As String
    Private m_vhFileName As String
    Private m_vhCreationDate As String
    Private m_vhComments As String
    Private m_vhLastEdit As String
    Private m_vhLastUpdate As Date

    Private Const constVhKey As Int32 = -1
    Private Const constvhOSKey As Int32 = -1
    Private Const constVhName As String = "na"
    Private Const constVhVendor As String = "na"
    Private Const constVhVersion As String = "na"
    Private Const constVhRelease As String = "na"
    Private Const constVhServicePack As String = "na"
    Private Const constVhFixLevel As String = "na"
    Private Const constVhFileName As String = "na"
    Private Const constVhCreationDate As Date = #1/1/2001#
    Private Const constVhComments As String = "none"
    Private Const constVhLastEdit As String = "na"
    Private Const constVhLastDate As Date = #1/1/2001#

    Public Property vhKey() As Int32
        Get
            Return Me.m_vhKey
        End Get
        Set(ByVal value As Int32)
            Me.m_vhKey = value
            Me.OnPropertyChanged("vhKey")
        End Set
    End Property

    Public Property vhOSKey() As Int32
        Get
            Return Me.m_vhOSKey
        End Get
        Set(ByVal value As Int32)
            Me.m_vhOSKey = value
            Me.OnPropertyChanged("vhOSKey")
        End Set
    End Property


    Public Property vhName() As String
        Get
            Return Me.m_vhName
        End Get
        Set(ByVal value As String)
            Me.m_vhName = value
            Me.OnPropertyChanged("vhName")
        End Set
    End Property

    Public Property vhVendor() As String
        Get
            Return Me.m_vhVendor
        End Get
        Set(ByVal value As String)
            Me.m_vhVendor = value
            Me.OnPropertyChanged("vhVendor")
        End Set
    End Property

    Public Property vhVersion() As String
        Get
            Return Me.m_vhVersion
        End Get
        Set(ByVal value As String)
            Me.m_vhVersion = value
            Me.OnPropertyChanged("vhVersion")
        End Set
    End Property

    Public Property vhRelease() As String
        Get
            Return Me.m_vhRelease
        End Get
        Set(ByVal value As String)
            Me.m_vhRelease = value
            Me.OnPropertyChanged("vhRelease")
        End Set
    End Property

    Public Property vhServicePack() As String
        Get
            Return Me.m_vhServicePack
        End Get
        Set(ByVal value As String)
            Me.m_vhServicePack = value
            Me.OnPropertyChanged("vhServicePack")
        End Set
    End Property

    Public Property vhFixLevel() As String
        Get
            Return Me.m_vhFixLevel
        End Get
        Set(ByVal value As String)
            Me.m_vhFixLevel = value
            Me.OnPropertyChanged("vhFixLevel")
        End Set
    End Property

    Public Property vhFileName() As String
        Get
            Return Me.m_vhFileName
        End Get
        Set(ByVal value As String)
            Me.m_vhFileName = value
            Me.OnPropertyChanged("vhFileName")
        End Set
    End Property

    Public Property vhCreationDate() As Date
        Get
            Return Me.m_vhCreationDate
        End Get
        Set(ByVal value As Date)
            Me.m_vhCreationDate = value
            Me.OnPropertyChanged("vhCreationDate")
        End Set
    End Property

    Public Property vhComments() As String
        Get
            Return Me.m_vhComments
        End Get
        Set(ByVal value As String)
            Me.m_vhComments = value
            Me.OnPropertyChanged("vhComments")
        End Set
    End Property


    Public Property vhLastEdit() As String
        Get
            Return Me.m_vhLastEdit
        End Get
        Set(ByVal value As String)
            Me.m_vhLastEdit = value
            Me.OnPropertyChanged("vhLastEdit")
        End Set
    End Property

    Public Property vhLastUpdate() As Date
        Get
            Return Me.m_vhLastUpdate
        End Get
        Set(ByVal value As Date)
            Me.m_vhLastUpdate = value
            Me.OnPropertyChanged("vhLastUpdate")
        End Set
    End Property


#End Region

#Region " Methods "


    Public Sub initProperties()

        Try
            vhKey = constVhKey
            vhOSKey = constvhOSKey
            vhName = constVhName
            vhVendor = constVhVendor
            vhVersion = constVhVersion
            vhRelease = constVhRelease
            vhServicePack = constVhServicePack
            vhFixLevel = constVhFixLevel
            vhFileName = constVhFileName
            vhCreationDate = constVhCreationDate
            vhComments = constVhComments
            vhLastEdit = constVhLastEdit
            vhLastUpdate = Now

        Catch ex As Exception
            Dim rethrow As Boolean = ExceptionPolicy.HandleException(ex, "Log Only Policy")
            If (rethrow) Then
                Throw
            End If
        End Try

    End Sub




#End Region


End Class


